package com.healthcarex.hip.saas.security.service;


import com.healthcarex.hip.saas.security.model.SysResource;

import java.util.List;
import java.util.Set;

/**
 * @author chenpan
 * @ClassName: IResourceService
 * description:
 * @date 2018-04-02 16:21
 */

public interface IResourceService {

    List<SysResource> findUserPermissions(String username);

    List<SysResource> findUserSysResources(String username, List<Integer> appIds);

    List<SysResource> findAllSysResources(SysResource SysResource);

    List<SysResource> findResourcesTree(SysResource resource);

    List<SysResource> findResources(SysResource resource);

    List<SysResource> getMenuButtonTree();

    List<SysResource> getMenuTree();

    List<SysResource> getUserMenu(String username);

    SysResource findById(Integer SysResourceId);

    SysResource findByNameAndType(String resourceName, String type);

    void addSysResource(SysResource resource);

    void updateSysResource(SysResource resource);

    void deleteResources(String resourceIds);

    /**
     * 获取角色集合
     *
     * @param username
     * @return
     */
    Set<String> getAuthorities(String username);

    /**
     * 获取权限标识集合
     *
     * @param username
     * @return
     */
    Set<String> getStringPermissions(String username);


}
